/*
Copyright 2002-2003 The University of Texas at Austin

Authors: Anthony Thane <thanea@ices.utexas.edu>
Vinay Siddavanahalli <skvinay@cs.utexas.edu>
Advisor: Chandrajit Bajaj <bajaj@cs.utexas.edu>

This file is part of Volume Rover.

Volume Rover is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Volume Rover is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with iotree; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#if !defined(AFX_COLORTABLEINFORMATION_H__890F2A7C_3D2F_4296_A3AA_C15CDB1217E3__INCLUDED_)
#define AFX_COLORTABLEINFORMATION_H__890F2A7C_3D2F_4296_A3AA_C15CDB1217E3__INCLUDED_

#include "alphamap.h"
#include "colormap.h"
#include "IsocontourMap.h"

namespace PBVP {
	/// <summary>
	/// 
	/// </summary>
	class TransferMap  
	{
	public:
		/// <summary>
		/// 
		/// </summary>
		TransferMap();
		/// <summary>
		/// 
		/// </summary>
		/// <param name="alphaMap"></param>
		/// <param name="colorMap"></param>
		/// <param name="isocontourMap"></param>
		TransferMap(const AlphaMap& alphaMap, const ColorMap& colorMap, const IsocontourMap& isocontourMap);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="copy"></param>
		TransferMap(const TransferMap& copy);
		/// <summary>
		/// Destructor
		/// </summary>
		virtual ~TransferMap();

		/// <summary>
		/// 
		/// </summary>
		void removeSandwichedNodes();
		/// <summary>
		/// 
		/// </summary>
		void resetNodes();

		/// <summary>
		/// 
		/// </summary>
		/// <returns>const AlphaMap&amp;</returns>
		const AlphaMap& getAlphaMap() const;
		/// <summary>
		/// 
		/// </summary>
		/// <returns>const ColorMap&amp;</returns>
		const ColorMap& getColorMap() const;
		/// <summary>
		/// 
		/// </summary>
		/// <returns>const IsocontourMap&amp;</returns>
		const IsocontourMap& getIsocontourMap() const;

		/// <summary>
		/// 
		/// </summary>
		/// <returns>AlphaMap&amp;</returns>
		AlphaMap& getAlphaMap();
		/// <summary>
		/// 
		/// </summary>
		/// <returns>ColorMap&amp;</returns>
		ColorMap& getColorMap();
		/// <summary>
		/// 
		/// </summary>
		/// <returns>IsocontourMap&amp;</returns>
		IsocontourMap& getIsocontourMap();

		/// <summary>
		/// 
		/// </summary>
		/// <param name="fileName"></param>
		/// <returns>bool</returns>
		bool saveColorTable(const QString& fileName);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="fileName"></param>
		/// <returns>bool</returns>
		bool loadColorTable(const QString& fileName);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="stream"></param>
		/// <returns>bool</returns>
		bool loadColorTable(QTextStream& stream);

	protected:
		/// <summary>
		/// 
		/// </summary>
		void removeSandwichedAlphaNodes();
		/// <summary>
		/// 
		/// </summary>
		void removeSandwichedColorNodes();

		AlphaMap m_AlphaMap;
		ColorMap m_ColorMap;
		IsocontourMap m_IsocontourMap;
	};
}

#endif // !defined(AFX_COLORTABLEINFORMATION_H__890F2A7C_3D2F_4296_A3AA_C15CDB1217E3__INCLUDED_)
